export const formConfig = [
    {
        name: 'scope_id_list',
        type: 'cascader',
        placeholder: '筛选范围',
        options: [],
    },
    {
        name: 'device_name',
        type: 'input',
        placeholder: '设备名称',
    },
    // {
    //     name: 'sensor_name',
    //     type: 'input',
    //     placeholder: '测点名称',
    // },
    {
        name: 'address',
        type: 'input',
        placeholder: '地址',
    },
    {
        name: 'port',
        type: 'input',
        placeholder: '端口',
    },
    {
        name: 'sensor_type',
        type: 'select_id',
        placeholder: '测点类型',
    },
    {
        name: 'status',
        type: 'select',
        placeholder: '测点状态',
        options: [
            {
                label: '在线',
                value: '在线',
            },
            {
                label: '离线',
                value: '离线',
            },
            {
                label: '异常',
                value: '异常',
            },
        ],
    },
]

export const config = [
    {
        label: '设备名称',
        type: 'device',
        name: 'device',
        all: true,
        required: true,
    },
    {
        label: '测点名称',
        type: 'input',
        name: 'sensor_name',
        required: true,
    },
    {
        label: '地址',
        type: 'input',
        name: 'address',
        required: true,
    },
    {
        label: '端口',
        type: 'input',
        name: 'port',
        required: true,
    },
    {
        label: '安装方向',
        type: 'select',
        name: 'direction',
        options: [
            {
                label: 'A轴向',
                value: 'A',
            },
            {
                label: 'H水平',
                value: 'H',
            },
            {
                label: 'V垂直',
                value: 'V',
            },
        ],
        required: true,
    },
    {
        label: '测点FS',
        type: 'input',
        name: 'fs',
        required: true,
    },
    // {
    //     label: '测点状态',
    //     type: 'select',
    //     name: 'status',
    //     options: [
    //         {
    //             label: '在线',
    //             value: '在线'
    //         },
    //         {
    //             label: '离线',
    //             value: '离线'
    //         }
    //     ],
    //     required: true
    // },
    {
        label: '终端类型',
        type: 'select_id',
        name: 'sensor_type',
        required: true,
    },
    // {
    //     label: '特征值类型',
    //     type: 'select_id',
    //     name: 'eigenvalue',
    //     multiple: true,
    //     required: true
    // },
]

export const column = [
    {
        name: 'selection',
    },
    {
        label: '设备名称',
        name: 'device_name',
    },
    {
        label: '测点名称',
        name: 'sensor_name',
    },
    {
        label: '地址',
        name: 'address',
        width: '80',
    },
    {
        label: '端口',
        name: 'port',
        width: '80',
    },
    {
        label: '安装方向',
        name: 'direction',
        width: '90',
    },
    {
        label: '测点FS',
        name: 'fs',
        width: '80',
    },
    {
        label: '测点状态',
        name: 'status',
        width: '90',
        style: (val) => `color: ${val === '在线' ? '#289747' : '#e43f31'}`,
    },
    {
        label: '终端类型',
        name: 'sensor_type',
    },
    {
        label: '最新数据获取时间',
        name: 'time',
        type: 'obj',
        width: '240',
    },
    {
        label: '最新特征值',
        name: 'data',
        type: 'obj',
        width: '160',
    },
    {
        title: '操作',
        name: 'action',
        width: '220',
        buttons: [
            {
                text: '查看',
                click: (val) => {},
            },
            {
                text: '编辑',
                click: (val) => {},
            },
            {
                text: '删除',
                click: (val) => {},
            },
        ],
    },
]
